package com.example.demofdfs.model;

import java.io.Serializable;
import java.util.UUID;

@SuppressWarnings("serial")
public class CommandResutl implements Serializable {

	public final static int ERROR_CODE = 0;
	public final static int SUCCESS_CODE = 1;
	
	private String resultId;
	private String result;
	private String error;
	private int state;
	
	public CommandResutl(String text, int state) {
	}
	
	public CommandResutl(String result, String error, int state) {
		this.resultId = UUID.randomUUID().toString().replace("-", "");
		this.state = state;
		this.error = error;
		this.result = result;
	}
	
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public String getError() {
		return error;
	}
	public void setError(String error) {
		this.error = error;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}

	public String getResultId() {
		return resultId;
	}

	public void setResultId(String resultId) {
		this.resultId = resultId;
	}

	@Override
	public String toString() {
		return "CommandResutl [result=" + result + ", error=" + error + "]";
	}
	
}
